﻿<%@ Page Title="" Language="C#" MasterPageFile="~/GlobalReference/GlobalReferenceMaster.master"
    AutoEventWireup="true" CodeBehind="EmployeeDetailsForm.aspx.cs" Inherits="Eassets.UI.GlobalReference.EmployeeDetailsForm" %>

<%@ Register Src="~/Components/FlashMessage.ascx" TagName="FlashMessage" TagPrefix="osm" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <script src="../styles/Common.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="formtitle">
        <asp:Label ID="labelFormTitle" runat="server" Text="Employee Details"></asp:Label>
    </div>
    <div>
        <osm:FlashMessage ID="FlashMessage1" runat="server" />
    </div>
    <fieldset>
        <ul class="form">
            <li>
                <div>
                    <%-- AllowPaging="True" PageSize="10"--%>
                    <asp:GridView ID="gridViewEmployeeDetails" runat="server" Caption="EmployeeDetails"
                        CssClass="ColStyle" EmptyDataText="No data to display" AutoGenerateColumns="False" 
                        OnSelectedIndexChanged="gridViewEmployeeDetails_SelectedIndexChanged" OnRowCreated="gridViewEmployeeDetails_OnRowCreated">
                        <RowStyle CssClass="RowStyle" />
                        <AlternatingRowStyle CssClass="AltRowStyle" />
                        <HeaderStyle CssClass="GridHeader" />
                        <SelectedRowStyle CssClass="SelectedRowStyle" />
                        <Columns>
                            <asp:CommandField ItemStyle-Width="20" ShowSelectButton="True" ButtonType="Image"
                                SelectImageUrl="~/styles/images/Select_icon_button.gif" />
                            <asp:BoundField HeaderText="EmployeeId" DataField="EmployeeId" ItemStyle-Width="190" />
                            <asp:BoundField HeaderText="EmployeeName" DataField="EmployeeName" />
                            <asp:BoundField HeaderText="EmployeeType" DataField="EmployeeType" />
                            <asp:BoundField HeaderText="" DataField="Title" />
                            <asp:BoundField HeaderText="" DataField="Initials" />
                            <asp:BoundField HeaderText="" DataField="UserName" />
                            <asp:BoundField HeaderText="" DataField="Email" />
                            <asp:BoundField HeaderText="" DataField="PhoneNumber" />
                            <asp:BoundField HeaderText="" DataField="Gender" />
                            <asp:BoundField HeaderText="" DataField="DateOfBirth" />
                            <asp:BoundField HeaderText="" DataField="NICNo" />
                            <asp:BoundField HeaderText="" DataField="UserGroup" />
                            <asp:BoundField HeaderText="" DataField="MaritalStatus" />
                        </Columns>
                    </asp:GridView>
                </div>
            </li>
            <li>
                <br />
            </li>
        </ul>
    </fieldset>
    <br />
    <fieldset>
        <ul class="form">
            <li>
                <div class="formfield">
                    <asp:Label ID="labelTitle" runat="server" Text="Title" CssClass="legendlabel_size2"></asp:Label>
                    <asp:DropDownList ID="dropDownListTitle" runat="server" CssClass="select" AutoPostBack="true">
                        <asp:ListItem Value="Mr" Text="Mr"></asp:ListItem>
                        <asp:ListItem Value="Mrs" Text="Mrs"></asp:ListItem>
                    </asp:DropDownList>
                </div>
            </li>
        </ul>
        <ul class="form">
            <li>
                <div class="formfield">
                    <asp:Label ID="labelNameInFull" runat="server" Text="Name In Full" CssClass="legendlabel_size2"></asp:Label>
                    <asp:TextBox ID="textBoxNameInFull" runat="server" CssClass="textbox_customsize"
                        Width="180px"></asp:TextBox>
                </div>
            </li>
        </ul>
        <ul class="form">
            <li>
                <div class="formfield">
                    <asp:Label ID="labelInitials" runat="server" Text="Initials" CssClass="legendlabel_size2"></asp:Label>
                    <asp:TextBox ID="textBoxInitials" runat="server" CssClass="textbox_customsize" Width="100px"></asp:TextBox>
                </div>
            </li>
        </ul>
        <ul class="form">
            <li>
                <div class="formfield">
                    <asp:Label ID="labelUsedName" runat="server" Text="Used Name" CssClass="legendlabel_size2"></asp:Label>
                    <asp:TextBox ID="textBoxUsedName" runat="server" CssClass="textbox_customsize" Width="100px"></asp:TextBox>
                    <asp:Label ID="labelUsedNameStar" runat="server" Text="*" CssClass="mandatoryfield"></asp:Label>
                </div>
            </li>
        </ul>
        <ul class="form">
            <li>
                <div class="formfield">
                    <asp:Label ID="labelEmail" runat="server" Text="Email" CssClass="legendlabel_size2"></asp:Label>
                    <asp:TextBox ID="textBoxEmail" runat="server" CssClass="textbox_customsize" Width="180px"></asp:TextBox>
                    <asp:Label ID="labelEmailStar" runat="server" Text="*" CssClass="mandatoryfield"></asp:Label>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="Please Enter Valid e-Mail address"
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Static"
                        ControlToValidate="textBoxEmail" Font-Bold="True"></asp:RegularExpressionValidator>
                </div>
            </li>
        </ul>
        <ul class="form">
            <li>
                <div class="formfield">
                    <asp:Label ID="labelContactNo" runat="server" Text="Contact No" CssClass="legendlabel_size2"></asp:Label>
                    <asp:TextBox ID="textBoxContactNo" runat="server" CssClass="textbox_customsize" Width="100px"
                        MaxLength="10"></asp:TextBox>
                </div>
            </li>
        </ul>
        <ul class="form">
            <li>
                <div class="formfield">
                    <asp:Label ID="labelGender" runat="server" Text="Gender" CssClass="legendlabel_size2"></asp:Label>
                    <asp:DropDownList ID="dropDownListGender" runat="server" CssClass="select" AutoPostBack="true">
                        <asp:ListItem Value="Male" Text="Male"></asp:ListItem>
                        <asp:ListItem Value="Female" Text="Female"></asp:ListItem>
                    </asp:DropDownList>
                </div>
            </li>
        </ul>
        <ul class="form">
            <li>
                <div class="formfield">
                    <asp:Label ID="labelDateOfBirth" runat="server" Text="DateOfBirth" CssClass="legendlabel_size2"></asp:Label>
                    <asp:TextBox ID="textBoxDateOfBirth" runat="server" CssClass="textbox_customsize"
                        Width="100px" MaxLength="10"></asp:TextBox>
                    <asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="textBoxDateOfBirth">
                    </asp:CalendarExtender>
                </div>
            </li>
        </ul>
        <ul class="form">
            <li>
                <div class="formfield">
                    <asp:Label ID="labelNICNo" runat="server" Text="NIC No" CssClass="legendlabel_size2"></asp:Label>
                    <asp:TextBox ID="textBoxNICNo" runat="server" CssClass="textbox_customsize" Width="100px"
                        MaxLength="10">
                    </asp:TextBox>
                    <asp:RegularExpressionValidator ID="ContactNo" runat="server" ValidationExpression="^\d{9}[V|v|x|X]$"
                        ControlToValidate="textBoxNICNo" ErrorMessage="Please Enter Valid NIC Number"
                        Font-Bold="True" Display="Dynamic"></asp:RegularExpressionValidator>
                </div>
            </li>
        </ul>
        <ul class="form">
            <li>
                <div class="formfield">
                    <asp:Label ID="labelMaritalStatus" runat="server" Text="Marital Status" CssClass="legendlabel_size2"></asp:Label>
                    <asp:TextBox ID="textBoxMaritalStatus" runat="server" CssClass="textbox_customsize"
                        Width="100px" MaxLength="8"></asp:TextBox>
                </div>
            </li>
        </ul>
        <ul class="form">
            <li>
                <div class="formfield">
                    <asp:Label ID="labelEmployeeType" runat="server" Text="EmployeeType" CssClass="legendlabel_size2"></asp:Label>
                    <asp:DropDownList ID="dropDownListEmployeeType" runat="server" CssClass="select"
                        AutoPostBack="true">
                        <asp:ListItem Value="Employee" Text="Employee"></asp:ListItem>
                        <asp:ListItem Value="Supplier" Text="Supplier"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="labelEmployeeTypeStar" runat="server" Text="*" CssClass="mandatoryfield"></asp:Label>
                </div>
            </li>
        </ul>
        <ul class="form">
            <li>
                <div class="formfield">
                    <asp:Label ID="label1" runat="server" Text="User Group" CssClass="legendlabel_size2"></asp:Label>
                    <asp:DropDownList ID="dropDownListUserGroup" runat="server" CssClass="select" AutoPostBack="true">
                        <asp:ListItem Value="1" Text="Admin"></asp:ListItem>
                        <asp:ListItem Value="2" Text="BranchUser"></asp:ListItem>
                    </asp:DropDownList>
                </div>
            </li>
        </ul>
    </fieldset>
    <br />
    <fieldset>
        <ul class="form">
            <li>
                <div class="formfield">
                    <asp:Label ID="labelInitialPassword" runat="server" Text="Initial Password" CssClass="legendlabel_size2"
                        Visible="False"></asp:Label>
                    <asp:TextBox ID="textBoxInitialPassword" runat="server" CssClass="textbox_customsize"
                        Width="120px" TextMode="Password" Visible="False"></asp:TextBox>
                    <asp:Label ID="labelInitialPasswordStar" runat="server" Text="*" CssClass="mandatoryfield"
                        Visible="False"></asp:Label>
                </div>
            </li>
        </ul>
        <ul class="form">
            <li>
                <div class="formfield">
                    <asp:Label ID="labelNewPassword" runat="server" Text="New Password" CssClass="legendlabel_size2"></asp:Label>
                    <asp:TextBox ID="textBoxNewPassword" runat="server" CssClass="textbox_customsize"
                        Width="120px" TextMode="Password"></asp:TextBox>
                    <asp:Label ID="labelNewPasswordStar" runat="server" Text="*" CssClass="mandatoryfield"></asp:Label>
                </div>
            </li>
        </ul>
        <ul class="form">
            <li>
                <div class="formfield">
                    <asp:Label ID="labelConfirmPassword" runat="server" Text="Confirm Password" CssClass="legendlabel_size2"></asp:Label>
                    <asp:TextBox ID="textBoxConfirmPassword" runat="server" CssClass="textbox_customsize"
                        Width="120px" TextMode="Password"></asp:TextBox>
                    <asp:Label ID="labelConfirmPasswordStar" runat="server" Text="*" CssClass="mandatoryfield"></asp:Label>
                </div>
            </li>
        </ul>
    </fieldset>
    <br />
    <fieldset>
        <ul class="form">
            <li>
                <div>
                    <table>
                        <tr>
                            <td class="style4">
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <asp:Button ID="buttonSaveAdd" runat="server" Text="Add" CssClass="buttonstyle" OnClick="buttonAdd_click" />
                                <asp:Button ID="buttonModify" runat="server" Text="Modify" 
                                    CssClass="buttonstyle" onclick="buttonModify_Click" />
                                <asp:Button ID="buttonDelete" runat="server" Text="Delete" CssClass="buttonstyle" Visible="false" />
                            </td>
                            <td>
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <asp:Button ID="buttonSave" runat="server" Text="Save" CssClass="buttonstyle" OnClick="buttonSave_click" />
                                <asp:Button ID="buttonCancel" runat="server" Text="Cancel" CssClass="buttonstyle" />
                            </td>
                        </tr>
                    </table>
                </div>
            </li>
        </ul>
    </fieldset>
    <br />
</asp:Content>
